package com.yuwei.yurpc.config;

/**
 * rpc配置类
 *
 * @author yuwei
 * @date 10:52 2024/10/4
 */

import com.yuwei.yurpc.fault.retry.RetryStrategyKeys;
import com.yuwei.yurpc.loaderbalancer.LoadBalancerKeys;
import com.yuwei.yurpc.serializer.SerializerKeys;
import lombok.Data;

/**
 * RPC配置类
 * 该类用于集中管理RPC服务的相关配置信息
 */
@Data
public class RpcConfig {
    private RegistryConfig registryConfig = new RegistryConfig();
    // RPC服务的名称，默认值为"yu-rpc"
    private String name = "yu-rpc";

    // RPC服务的版本号，默认值为"1.0.0"
    private String version = "1.0.0";

    // RPC服务监听的主机地址，默认值为"127.0.0.1"
    private String serverHost = "127.0.0.1";

    // RPC服务监听的端口号，默认值为8888
    private Integer serverPort = 8888;

    // 是否开启模拟数据功能，默认值为false
    private Boolean mock = false;
    private String SerializerKey = SerializerKeys.JDK;
    private String LoadBalancer = LoadBalancerKeys.ROUND_ROBIN;



        /**
         * 重试策略
         */
        private String retryStrategy = RetryStrategyKeys.NO;


}

